package jml.config;

import java.util.Enumeration;
import java.util.Hashtable;

import jml.config.cmd.Command;

public class FileTypes
{
	private Command defaultPlayer;
	private Hashtable<String,FileType> fileTypes;
	
	public FileTypes()
	{
		setFileTypes(new Hashtable<String,FileType>());
	}

	public Hashtable<String,FileType> getFileTypes()
	{
		return fileTypes;
	}

	public void setFileTypes(Hashtable<String,FileType> fileTypes)
	{
		this.fileTypes = fileTypes;
	}

	public Command getDefaultPlayer()
	{
		return defaultPlayer;
	}

	public void setDefaultPlayer(Command defaultPlayer)
	{
		this.defaultPlayer = defaultPlayer;
	}
	
	public String toString()
	{
		String x ="defaultPlayer="+defaultPlayer+"\n";
		for(Enumeration<String> e = fileTypes.keys(); e.hasMoreElements();)
		{
			String k=e.nextElement();
			FileType f=fileTypes.get(k);
			System.out.println("{"+k+"="+f+"}\n");
		}
		
		return x;
	}
}
